/**
componentDidMount() - 挂载后调用
componentWillUnmount() - 删除后调用 .
Element.timer() 创建元素关联的定时器.
componentUpdate(props) - 更新组件内部数据.
 */

export default   class Clock extends Element 
{
  time = new Date(); // setting initial state 

  render() {
    return <div >
      <h1>Hello, world!</h1>
      <h2>It is {this.time.toLocaleTimeString()} now.</h2>
     </div>;
  } 
} 